From: Keir Fraser Date: Tue, 26 May 2009 09:01:54 +0000 (+0100) Subject: blkif: Clarify units for 'sector'-sized blkif request params. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~13886 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=d05ae13188231e3bc3673e0796d8b063b1d59cff;p=xen.git blkif: Clarify units for 'sector'-sized blkif request params. Signed-off-by: Stefano Stabellini --- diff --git a/xen/include/public/io/blkif.h b/xen/include/public/io/blkif.h index 2380066b8c..3e0c5abae3 100644 --- a/xen/include/public/io/blkif.h +++ b/xen/include/public/io/blkif.h @@ -84,6 +84,13 @@ */ #define BLKIF_MAX_SEGMENTS_PER_REQUEST 11 +/* + * NB. first_sect and last_sect in blkif_request_segment, as well as + * sector_number in blkif_request, are always expressed in 512-byte units. + * However they must be properly aligned to the real sector size of the + * physical disk, which is reported in the "sector-size" node in the backend + * xenbus info. Also the xenbus "sectors" node is expressed in 512-byte units. + */ struct blkif_request_segment { grant_ref_t gref; /* reference to I/O buffer frame */ /* @first_sect: first sector in frame to transfer (inclusive). */